package com.baizhi.service.impl;

import com.baizhi.dao.CmfzLessonClassDao;
import com.baizhi.entity.CmfzLessonClass;
import com.baizhi.service.CmfzLessonClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: renpu
 * @Date: 2019/3/7 19:40
 * @Description:
 */

@Service
@Transactional
public class CmfzLessonClassImpl implements CmfzLessonClassService {

    @Autowired
    private CmfzLessonClassDao lessonClassDao;


    @Override
    public void addClass(String lessonName,int userId) {
        lessonClassDao.addClass(lessonName,userId);

    }

    @Override
    public List<CmfzLessonClass> selectIdClass(int userId) {
        return lessonClassDao.selectIdClass(userId);
    }

    @Override
    public void deleteIdLesson(int lessonId) {
        lessonClassDao.deleteLesson(lessonId);
    }
}
